<header id="header">
  <nav class="navbar navbar-inverse" role="navigation">
    <!--自适应导航-->
    <div class="container"> 
      <!-- Brand and toggle get grouped for better mobile display -->
      <div class="navbar-header">
        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand p8" href="{:url('Index/index')}"><img src="__PUBLIC__/static/photos/logo.png"  height="50" alt="Logo"></a>
      </div>
      <!--宽度自适应折叠图标及LOGO END-->
      
      <!-- Collect the nav links, forms, and other content for toggling -->
      <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
        <ul class="nav navbar-nav">
            <li class="active"><a href="{:url('Index/index')}">首页</a></li>   
            {volist name="NAVS" id="item"}
                <!-- 循环分类栏目数据,并且根据栏目类型的不同,将栏目链接设计为跳转到不同的控制器 -->
                {if condition="in_array('children', array_keys($item))== true"}
                <li class="dropdown">
                  <a href="#" class="dropdown-toggle" data-toggle="dropdown" title="{$item.name_cn}">{$item.name_cn}<span class="caret"></span></a>
                  <ul  class="dropdown-menu menu-top" role="menu">
                    {foreach $item['children'] as $vo} 
                        {if condition="in_array('children', array_keys($vo))== true"}
                        <li class="dropdown-submenu">
                            <a href="#" title="{$vo.name_cn}">{$vo.name_cn}</a>
                            <ul class="dropdown-menu">
                                {foreach $vo['children'] as $sub_item_01} 
                                  <li><a href="{:url('Category/index',array('id'=>$sub_item_01.id))}" title="{$sub_item_01.name_cn}">{$sub_item_01.name_cn}</a>
                                  </li>
                                {/foreach}
                            </ul>
                        </li>
                        {else /} 
                        <li><a href="{:url('Category/index',array('id'=>$vo.id))}" title="{$vo.name_cn}">{$vo.name_cn}</a></li>
                        {/if}
                    {/foreach}
                  </ul>
                </li>
                {else /} 
                <li><a href="{:url('Category/index',array('id'=>$item.id))}" title="{$item.name_cn}">{$item.name_cn}</a></li>
                {/if}
            {/volist}
        </ul>    
      </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
  </nav>
</header>